package file;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteString {
    public static void main(String[] args) throws IOException {
        FileOutputStream f1=new FileOutputStream("./demo1.txt",true);
        String s = "一袋米";
        byte[] b = s.getBytes(StandardCharsets.UTF_8);
        String line="洗衣机";
        b=line.getBytes(StandardCharsets.UTF_8);
        System.out.println(b);
        f1.write(b);
        f1.close();
    }
}
